       
var geocoder;
var myOptions;
var latlng;
var map;
var marker; 
var infowindow;
var timer;
var interval;
var directionDisplay = new google.maps.DirectionsRenderer();
var directionsService = new google.maps.DirectionsService();
var  placeMarker;
var friendsCount;
var friendsMarker = new Array();
var friendsInfowindow = new Array();
var count = 0;

   $(function($){
   
            if(navigator.geolocation == undefined){
                alert("�� ������� geolocation�� �������� �ʽ��ϴ�.");
                return;
            }
            
             geocoder = new google.maps.Geocoder();
             myOptions;
             latlng;
             map = new google.maps.Map($("#map_canvas")[0],null);
             marker = new google.maps.Marker(); 
             timer;
            map.setZoom(11); 
            marker.setIcon("../res/drawable-hdpi/marker.png");
            window.android.setPlaceMarker();
            
    });
                 
    function setPlaceMerker(dlat,dlng){
        //window.android.callAndroid("lat: "+lat+", lag:"+lng);
        
        latlng = new google.maps.LatLng(dlat,dlng);
        placeMarker = new google.maps.Marker(); 
                
        myOptions = {
          zoom: 18,
          center: latlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        
        map.setOptions(myOptions);
        map.setZoom(2);
        placeMarker.setPosition(latlng);
        placeMarker.setMap(map);
        placeMarker.setIcon("../res/drawable-hdpi/marker.png");
        
    }
    
